package com.maven.demo.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.maven.demo.model.pojo.User;
import com.maven.demo.service.UserService;

/**
 * @author yanwl
 * @date 2015年9月17日
 */
@Component
public class UpUserEventListener extends UpdateUserEventListener{
	@Autowired
	private UserService userService;

	@Override
	public void upUser(User oldUser, User newUser) {
		System.out.println("old:"+oldUser.getUserName());
		System.out.println("new:"+newUser.getUserName());
		userService.deleteUser(7);
	}
	
}
